<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Warehouse Order Management</title>
</head>
<body>
<div class="container-fluid my-5">
    <h1 class="mb-4">Warehouse Order Management</h1>
    <form>
        <div class="row g-3 align-items-end d-xl-flex my-3" id="warehouseOrderCondition">
        </div>
    </form>
    <div id="warehouseOrderOperation" role="group" class="btn-group" aria-label="warehouseOrder">
    </div>
    <div style="overflow: auto">
        <table class="table table-striped" id="warehouseOrderTable">
        </table>
    </div>
    <div id="pagination" class="d-flex justify-content-between align-items-center pagination"></div>
</div>

<div class="modal fade" id="warehouseOrderModal" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <form id="warehouseOrderDataForm" class="modal-content needs-validation" novalidate>
            <div class="modal-header">
                <h5 class="modal-title" id="modalLabel">Add Warehouse Order</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body row">
                <input type="hidden" id="warehouseOrderId"/>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Cancel</button>
                <button type="button" class="btn btn-primary" id="saveWarehouseOrderBtn"> Save</button>
            </div>
        </form>
    </div>
</div>
<div class="offcanvas offcanvas-end" style="width: 50rem" tabindex="-1" id="subtable"
     aria-labelledby="myOffcanvasLabel">
    <div class="offcanvas-body">
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">Order Line</h5>
                <div style="overflow: auto;max-height: 30rem;">
                    <table id="warehouseOrderLine" class="table table-striped">
                    </table>
                </div>
            </div>
        </div>
        <div class="card my-2">
            <div class="card-body">
                <h5 class="card-title">Order Charge Item</h5>
                <div style="overflow: auto;max-height: 30rem;">
                    <table id="warehouseOrderCharge" class="table table-striped">
                    </table>
                </div>
            </div>
        </div>
        <div class="card my-2">
            <div class="card-body">
                <h5 class="card-title">Attached File</h5>
                <table id="attaches" class="table table-striped">
                </table>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="uploadQuoteFile" tabindex="-1" aria-labelledby="upload quote file" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <form action="/rate/excel" id="uploadForm" method="post" enctype="multipart/form-data">
                <div class="modal-header">
                    <h5 class="modal-title">Manage Items</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="formFile" class="form-label">Choose a file</label>
                        <input class="form-control" type="file" id="formFile" name="file" required>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="submit" class="btn btn-primary">Upload</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="../js/common.js"></script>
<script src="js/warehouseorder.js"></script>
</body>
</html>